<?php

/**
 * +------ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER * ---------+
 * +----------------------------------------------------------------------------+
 * | PHPKiisf - Keep It in Simple Framework					|
 * | Version 1.0								|
 * | Copyright (C) <2013>  Mario Cezzare <mcezzare@gmail.com>			|
 * | Blog: http://mcezzare.blogspot.com.br					|
 * |										|
 * | This program is part of PHPKiisf, and is free software: you can		|
 * | redistribute it and/or modify it under the terms of the GNU 		|
 * | General Public License as published by					|
 * | the Free Software Foundation, either version 3 of the License, or		|
 * | (at your option) any later version.					|					|
 * |										|									|
 * | This program is distributed in the hope that it will be useful,		|
 * | but WITHOUT ANY WARRANTY; without even the implied warranty of		|
 * | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the		|
 * | GNU General Public License for more details.				|
 * | You should have received a copy of the GNU General Public License		|
 * | along with this program.  If not, see <http://www.gnu.org/licenses/>.	|
 * +----------------------------------------------------------------------------+
 * | Author : <Mario Cezzare Angelicola Chiodi> <mcezzare@gmail.com>		|
 * +----------------------------------------------------------------------------+
 * | Contributors								|
 * |										|
 * +----------------------------------------------------------------------------+
 *
 */
/*
 * @package	controllers
 * @access	public
 * @since	2013-03-08
 * @author	Mario Cezzare <mcezzare@gmail.com>
 */

/**
 * Classe responsável por gerenciar a home inicial
 *
 */
class home_controller extends default_controller {

	/**
	 * [$_info description]
	 * @var array
	 */
	public static $_info = array() ;

	/**
	 * [$_default_config description]
	 * @var [type]
	 */
	private static $_default_config ;

	/**
	 * [$_default_template_section description]
	 * @var [type]
	 */
	private static $_default_template_section ;

	/**
	 * [__construct description]
	 */
	public function __construct() {
		self::$_default_config = config::get_config() ;
		/* defined in phpkiisf.ini, Section TEMPLATES */
		self::$_default_template_section = "INDEX_HOME" ;
		self::initialize_template_path() ;
	}

	/**
	 * @override
	 */
	public static function init() {
		parent::init() ;
		// error_reporting( E_ALL | E_STRICT ) ;
		mb_internal_encoding( 'UTF-8' ) ;
		session_start() ;
		self::initialize_template_path() ;
	}

	/**
	 * @override - extends from default, change here for your new home
	 *
	 * @param type $options
	 * @return boolean
	 *
	 */
	public static function display_index( $options = array() ) {
		/* to get templates list  */
		$include_file = self::get_template( self::$_default_template_section ) ;
		/* If exists,  include the template, defined in phpkiisf.ini */
		if ( !self::include_template( $include_file , $options ) ) {

		}
	}

	/**
	 * Initialize the constant PUBLIC_HTML_DIR
	 * @return [type] [description]
	 */
	public static function initialize_template_path() {
//				if ( !defined( PUBLIC_HTML_DIR ) ) {
		define( "PUBLIC_HTML_DIR" , base_template::$public_media_dir ) ;
//				}
	}

	public function display_who_we_are() {
		print "Quem Somos<br>" ;
		return ;
	}

}

?>
